Addressing Continuous Refreshing Issue in Development Environment #1458
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bug
Issue Number:
Fixes #1370
Did you add tests for your changes?
Yes
Snapshots/Videos:
1370.mp4
Summary
The issue of continuous refreshing occurs when local storage data is overwritten by another application running on the same port as Talawa-admin. This PR addresses the problem by introducing a prefix added to the key stored in local storage, ensuring the uniqueness of the key and preventing it from being overwritten.
In the first part of the video, we run the current Talawa-admin on port 3000 to log in. Without logging out, we stop the Talawa-admin server and run another application on port 3000. We observe token conflicts, which modify the value of the token. When we stop this project and start Talawa-admin again, we encounter the issue of continuous refreshing.
In the second part of the video, we run the updated Talawa-admin on port 3000. After logging in, we notice that the key stored in local storage has been prefixed. When we run another project on port 3000, we observe the addition of some data, but there are no conflicts. Upon starting Talawa-admin again, we successfully log in without facing any refreshing issues.
Other information
While this issue is not likely to occur in production, it significantly hinders the development process when contributors are working on multiple projects.
Have you read the contributing guide?
Yes